To truly understand this article 2 Samuel 14-19 should also be read, but I will quickly give a short and rough overview of what happened during this historical event.
At one point king David had an affair with a married woman named Bath-sheba and had her husband murdered (2 Samuel 11). God showed king David the error of his ways, he immediately acknowledged his mistake and asked God for forgiveness (2 Samuel 12). God forgave him, but then told him that: The baby Bath-sheba was expecting would die and warned him that from inside his family evil would come.
Long story short: the baby did pass away as God told him and He was later overthrown by his own son named: Absalom which he had with another wife. David then fled with the few that still followed him and this is where the story starts getting very interesting for me.
When fleeing out of the city, the followers of David took the ark of God with them. When David realized this, he demanded that they take it back to the city. It needs to be noted that at that stage the ark is where they knew God to be and they believed that as long as they kept it with them, they would be prosperous. So why on earth would someone in a terrible situation demand for their only source of hope to be taken away?
David had a faith in God that I don't think we can comprehend. David explained to them that: if God does not want to be with him, he would not try and force Him (2 Samuel 15: 25-26). Yes God told him that something like this would happen, but he trusted God through the "no hope" situation and even when it seemed like God threw him away. He trusted God so much that even if God wanted to hurt him, he would be thankful.
This is the type of faith Job had when he lost everything:
And he said:
“Naked I came from my mother’s womb,
And naked shall I return there.
The Lord gave, and the Lord has taken away;
Blessed be the name of the Lord.” - Job 1: 21 KJV